﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
    <Style x:Key="MetroRadioStyle" TargetType="ToggleButton">
        <Setter Property="Padding" Value="8"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Grid Background="Transparent">
                		<VisualStateManager.VisualStateGroups>
                			<VisualStateGroup x:Name="CommonStates">
                				<VisualState x:Name="Normal"/>
                				<VisualState x:Name="Disabled">
                					<Storyboard>
                						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EnabledBackground">
                							<DiscreteObjectKeyFrame KeyTime="0">
                								<DiscreteObjectKeyFrame.Value>
                									<Visibility>Collapsed</Visibility>
                								</DiscreteObjectKeyFrame.Value>
                							</DiscreteObjectKeyFrame>
                						</ObjectAnimationUsingKeyFrames>
                						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DisabledBackground">
                							<DiscreteObjectKeyFrame KeyTime="0">
                								<DiscreteObjectKeyFrame.Value>
                									<Visibility>Visible</Visibility>
                								</DiscreteObjectKeyFrame.Value>
                							</DiscreteObjectKeyFrame>
                						</ObjectAnimationUsingKeyFrames>
                						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)" Storyboard.TargetName="DisabledContent">
                							<DiscreteObjectKeyFrame KeyTime="0">
                								<DiscreteObjectKeyFrame.Value>
                									<HorizontalAlignment>Center</HorizontalAlignment>
                								</DiscreteObjectKeyFrame.Value>
                							</DiscreteObjectKeyFrame>
                						</ObjectAnimationUsingKeyFrames>
                						<DoubleAnimation Duration="0" To="25.333" Storyboard.TargetProperty="(Control.FontSize)" Storyboard.TargetName="DisabledContent" d:IsOptimized="True"/>
                						<ColorAnimation Duration="0" To="{StaticResource PhoneDisabledColor}" Storyboard.TargetProperty="(Control.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="DisabledContent" d:IsOptimized="True"/>
                					</Storyboard>
                				</VisualState>
                				<VisualState x:Name="MouseOver"/>
                				<VisualState x:Name="Pressed"/>
                			</VisualStateGroup>
                			<VisualStateGroup x:Name="CheckStates">
                				<VisualState x:Name="Unchecked">
                					<Storyboard>
                						<ColorAnimation Duration="0" To="{StaticResource PhoneContrastForegroundColor}" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="EnabledBackground" d:IsOptimized="True"/>
                						<ColorAnimation Duration="0" To="{StaticResource PhoneContrastBackgroundColor}" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="EnabledBackground" d:IsOptimized="True"/>
                						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)" Storyboard.TargetName="EnabledContent">
                							<DiscreteObjectKeyFrame KeyTime="0">
                								<DiscreteObjectKeyFrame.Value>
                									<HorizontalAlignment>Center</HorizontalAlignment>
                								</DiscreteObjectKeyFrame.Value>
                							</DiscreteObjectKeyFrame>
                						</ObjectAnimationUsingKeyFrames>
                						<DoubleAnimation Duration="0" To="25.333" Storyboard.TargetProperty="(Control.FontSize)" Storyboard.TargetName="DisabledContent" d:IsOptimized="True"/>
                						<DoubleAnimation Duration="0" To="25.333" Storyboard.TargetProperty="(Control.FontSize)" Storyboard.TargetName="EnabledContent" d:IsOptimized="True"/>
                					</Storyboard>
                				</VisualState>
                				<VisualState x:Name="Checked">
                					<Storyboard>
                						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="EnabledContent">
                							<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneBackgroundBrush}"/>
                						</ObjectAnimationUsingKeyFrames>
                						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="DisabledBackground">
                							<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
                						</ObjectAnimationUsingKeyFrames>
                						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="DisabledBackground">
                							<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
                						</ObjectAnimationUsingKeyFrames>
                						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="DisabledBackground">
                							<DiscreteObjectKeyFrame KeyTime="0">
                								<DiscreteObjectKeyFrame.Value>
                									<Visibility>Visible</Visibility>
                								</DiscreteObjectKeyFrame.Value>
                							</DiscreteObjectKeyFrame>
                						</ObjectAnimationUsingKeyFrames>
                						<ColorAnimation Duration="0" To="{StaticResource PhoneContrastBackgroundColor}" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="EnabledBackground" d:IsOptimized="True"/>
                						<ColorAnimation Duration="0" To="{StaticResource PhoneContrastBackgroundColor}" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="EnabledBackground" d:IsOptimized="True"/>
                						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)" Storyboard.TargetName="EnabledContent">
                							<DiscreteObjectKeyFrame KeyTime="0">
                								<DiscreteObjectKeyFrame.Value>
                									<HorizontalAlignment>Center</HorizontalAlignment>
                								</DiscreteObjectKeyFrame.Value>
                							</DiscreteObjectKeyFrame>
                						</ObjectAnimationUsingKeyFrames>
                						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)" Storyboard.TargetName="DisabledContent">
                							<DiscreteObjectKeyFrame KeyTime="0">
                								<DiscreteObjectKeyFrame.Value>
                									<HorizontalAlignment>Center</HorizontalAlignment>
                								</DiscreteObjectKeyFrame.Value>
                							</DiscreteObjectKeyFrame>
                						</ObjectAnimationUsingKeyFrames>
                						<DoubleAnimation Duration="0" To="25.333" Storyboard.TargetProperty="(Control.FontSize)" Storyboard.TargetName="EnabledContent" d:IsOptimized="True"/>
                						<DoubleAnimation Duration="0" To="25.333" Storyboard.TargetProperty="(Control.FontSize)" Storyboard.TargetName="DisabledContent" d:IsOptimized="True"/>
                					</Storyboard>
                				</VisualState>
                				<VisualState x:Name="Indeterminate">
                					<Storyboard>
                						<DoubleAnimation Duration="0" To="25.333" Storyboard.TargetProperty="(Control.FontSize)" Storyboard.TargetName="DisabledContent" d:IsOptimized="True"/>
                						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)" Storyboard.TargetName="EnabledContent">
                							<DiscreteObjectKeyFrame KeyTime="0">
                								<DiscreteObjectKeyFrame.Value>
                									<HorizontalAlignment>Center</HorizontalAlignment>
                								</DiscreteObjectKeyFrame.Value>
                							</DiscreteObjectKeyFrame>
                						</ObjectAnimationUsingKeyFrames>
                						<DoubleAnimation Duration="0" To="25.333" Storyboard.TargetProperty="(Control.FontSize)" Storyboard.TargetName="EnabledContent" d:IsOptimized="True"/>
                					</Storyboard>
                				</VisualState>
                			</VisualStateGroup>
                			<VisualStateGroup x:Name="FocusStates">
                				<VisualState x:Name="Unfocused"/>
                				<VisualState x:Name="Focused"/>
                			</VisualStateGroup>
                		</VisualStateManager.VisualStateGroups>
                		<Border x:Name="EnabledBackground" BorderThickness="{TemplateBinding BorderThickness}" Margin="{StaticResource PhoneTouchTargetOverhang}" Background="#BFFFFFFF" BorderBrush="#BFFFFFFF">
                			<ContentControl x:Name="EnabledContent" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                		</Border>
                		<Border x:Name="DisabledBackground" BorderBrush="{StaticResource PhoneDisabledBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" IsHitTestVisible="False" Margin="{StaticResource PhoneTouchTargetOverhang}" Visibility="Collapsed">
                			<ContentControl x:Name="DisabledContent" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                				<ContentControl.Foreground>
                					<SolidColorBrush Color="{StaticResource PhoneContrastForegroundColor}"/>
                				</ContentControl.Foreground>
                			</ContentControl>
                		</Border>
                	</Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>